#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
    struct stat file_stat[argc];
    int ret;

    if(argc == 1){
        printf("The number of files entered was not what was expected!\n");
        exit(-1);
    }

    for(int i=1; i<argc; i++)
    {
        ret = stat(argv[i], &file_stat[i]);
        if(-1 == ret){
            perror("stat error");
            exit(-1);
        }

        printf("file name: %s\n", argv[i]);
        printf("file size: %ld bytes\ninode number: %ld\n\n", file_stat[i].st_size,file_stat[i].st_ino);  
    }

    exit(0);
}